import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-upload',
  templateUrl: './upload.component.html',
  styleUrls: ['./upload.component.css']
})
export class UploadComponent implements OnInit {

  constructor() { }

  ngOnInit() {
  }

  defaultFileList = [
    {
      uid: -1,
      name: 'xxx.png',
      status: 'done ',
      url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
      thumbUrl: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png'
    },
    {
      uid: -2,
      name: 'yyy.png',
      status: 'done ',
      url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
      thumbUrl: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png'
    }
  ];

  fileList1 = [...this.defaultFileList];
  fileList2 = [...this.defaultFileList];

  // 上传按钮
  uploadbutton(){
    // 遍历数组，改变状态
    console.log(this.fileList1)
    // for(var )
  }

  nzChange(event ){
    console.log(event)
    // console.log(file)
    if(event.type=="start"){
      console.log("我开始上传了")
    }
    if(event.type=="progress"){
      console.log("我正在上传")
    }
    if(event.type=="error"){
      console.log("上传失败")
    }
    if(event.type=="success"){
      console.log("上传成功")
    }
    
  }

  shangchuan(){
   
  }


}
